<template>
  <!-- 雷达图  图表必须给高和宽度-->
  <div ref="aj" class="aaaaaa" style="width: 1500px; height: 100%" />
</template>

<script>
// 完成加载过程
var echarts = require('echarts')

export default {
  // 页面渲染完毕事件
  mounted() {
    const myChart = echarts.init(this.$refs.aj) // 得到图表实例
    myChart.setOption({
      tooltip: {
        trigger: 'axis',
        axisPointer: {
          type: 'shadow'
        }
      },
      legend: {},
      grid: {
        left: '2%',
        right: '18%',
        bottom: '2%',
        top: '6%',
        containLabel: true
      },
      xAxis: [
        {
          type: 'category',
          data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
        }
      ],
      yAxis: [
        {
          type: 'value'
        }
      ],
      series: [
        {
          // name: 'Email',
          type: 'bar',
          stack: 'Ad',
          emphasis: {
            focus: 'series'
          },
          data: [110, 60, 200, 360, 390, 350, 210]
        },
        {
          // name: 'Union Ads',
          type: 'bar',
          stack: 'Ad',
          emphasis: {
            focus: 'series'
          },
          data: [80, 60, 200, 340, 390, 320, 210]
        },
        {
          // name: 'Video Ads',
          type: 'bar',
          stack: 'Ad',
          emphasis: {
            focus: 'series'
          },
          data: [10, 60, 201, 340, 390, 330, 210]
        }
      ]
    })
  }
}
</script>
<style>
.aaaaaa {
  margin:1.25rem auto;
  width: 1500px;
}
</style>
